format PE

include "..\FASM\INCLUDE\win32ax.inc"
include "..\INCLUDE\const.inc"

x_size		= 340
y_size		= 150
x_coord 	= 100
y_coord 	= 100

  start:
	call	Redraw
      Wait_Event:
	call	[WaitMessage]
	call	[StdHandler]
	jmp	Wait_Event

Redraw:
	invoke	Draw_StdWindow, x_coord*65536+y_coord,x_size*65536+y_size,"root",00101b
	mov	[WinID],eax
	invoke	WriteText, 15,0x16+10+20,1,4,"Hello World!"
	ret


WinID		rd 1


data import
;
; Import functions:
;

  library mx32,'mx32.dll'

  import mx32,\
	 f1,'OneFunction',\
	 VirtualAlloc,'VirtualAlloc',\
	 VirtualProtect,'VirtualProtect',\
	 VirtualFree,'VirtualFree',\
	 CreateProcess,'CreateProcess',\
	 ExitProcess,'ExitProcess',\
	 CreateThread,'CreateThread',\
	 ExitThread,'ExitThread',\
	 TestKbdInput,'TestKbdInput',\
	 PutChar,'PutChar',\
	 PutChar2,'PutChar2',\
	 PrintString,'PrintString',\
	 Get_Position,'Get_Position',\
	 Set_Position,'Set_Position',\
	 Set_focus,'Set_focus',\
	 Set_focusPID,'Set_focusPID',\
	 Get_FileAddress,'Get_FileAddress',\
	 Inkey,'Inkey',\
	 SendMessage,'SendMessage',\
	 ReceiveMessage,'ReceiveMessage',\
	 WaitMessage,'WaitMessage',\
	 GetPID,'GetPID',\
	 DefineWindow,'DefineWindow',\
	 DefineButton,'DefineButton',\
	 Put_pixel,'Put_pixel',\
	 Get_screen_param,'Get_screen_param',\
	 Draw_BLine,'Draw_BLine',\
	 Draw_Picture,'Draw_Picture',\
	 Kill_Window,'Kill_Window',\
	 Write_Text,'Write_Text',\
	 WriteText,'WriteText',\
	 Write_Hex,'Write_Hex',\
	 Draw_StdWindow,'Draw_StdWindow',\
	 StdHandler,'StdHandler',\
	 Draw_hLine,'Draw_hLine',\
	 Get_XYSize,'Get_XYSize',\
	 Get_WinParams,'Get_WinParams',\
	 End_of_redraw,'End_of_redraw',\
	 Begin_xDraw,'Begin_xDraw',\
	 Get_focus,'Get_focus',\
	 Create_CheckButton,'Create_CheckButton',\
	 FindFile,'FindFile',\
	 Create_StdButton,'Create_StdButton'
end data

